<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/commons/taglibs.jsp" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<%@ include file="/commons/meta.jsp" %>
	<link href="${ctx }/styles/css_uax.css" rel="stylesheet" type="text/css" />
	<link href="<c:url value="/widgets/simpletable/simpletable.css"/>" type="text/css" rel="stylesheet">
	<script type="text/javascript" src="<c:url value="/widgets/simpletable/simpletable.js"/>"></script>
	
	<script type="text/javascript" >
		$(document).ready(function() {
			// 分页需要依赖的初始化动作
			window.simpleTable = new SimpleTable('queryForm',${page.thisPageNumber},${page.pageSize},'${pageRequest.sortColumns}');
		});
	</script>
</head>

<body>
<div id="container">
<%@include file="/commons/top.jsp" %>
  <div id="sub-header" style="width: 900px">
	<form id="queryForm" name="queryForm" action="<c:url value="/MemberCenter/getDeletedMsg.do"/>" method="get" style="display: inline;">
		<table width="100%" cellpadding="3" cellspacing="6">
			<tr>
				<td width="200" valign="top">
					<%@ include file="/front/Members/memberLeft.jsp" %>
				</td>
				<td  valign="top">
					<div class="gridTable">
					<simpletable:pageToolbar page="${page}">
					</simpletable:pageToolbar>
					<table width="100%"  border="0" cellspacing="0" class="gridBody">
					  <thead>
						 <tr align="center">
						 	<th colspan="9" align="center" style="font-size: 20px;font-weight: bold;text-align: center;height: 30px;">
						 	已删除的信息
						 	</th>
						 </tr>
						  <tr>
							<th style="width:1px;"> </th>
							<th style="width:1px;"><input type="checkbox" onclick="setAllCheckboxState('items',this.checked)"></th>
							
							<!-- 排序时为th增加sortColumn即可,new SimpleTable('sortColumns')会为tableHeader自动增加排序功能; -->
							<th sortColumn="category.categoryName" >种类</th>
							<th sortColumn="cityId" >地区</th>
							<th sortColumn="phone" >电话</th>
							<th sortColumn="address" >地址</th>
							<th sortColumn="credit" >状态</th>
							<th sortColumn="commentCount" >评论次数</th>
							<th>操作</th>
						  </tr>
					  </thead>
					  <tbody>
					  	  <c:forEach items="${page.result}" var="item" varStatus="status">
					  	  
						  <tr class="${status.count % 2 == 0 ? 'odd' : 'even'}">
							<td>${page.thisPageFirstElementNumber + status.index}</td>
							<td><input type="checkbox" name="items" value="publishInfoId=${item.publishInfoId}&"></td>
							<td><c:out value='${item.category.categoryName}'/>&nbsp;</td>
							<td><c:out value='${item.cityId}'/>&nbsp;</td>
							<td><c:out value='${item.phone}'/>&nbsp;</td>
							<td><c:out value='${item.address}'/>&nbsp;</td>
							<td><c:out value='${item.status}'/>&nbsp;</td>
							<td><c:out value='${item.commentCount}'/>&nbsp;</td>
							<td>
								<a href="${ctx}/PublishInfo/show.do?publishInfoId=${item.publishInfoId}&">查看</a>&nbsp;&nbsp;&nbsp;
								<a href="${ctx}/PublishInfo/edit.do?publishInfoId=${item.publishInfoId}&">修改</a>
							</td>
						  </tr>
						  
					  	  </c:forEach>
					  </tbody>
					</table>
				
					<simpletable:pageToolbar page="${page}">
					</simpletable:pageToolbar>
				</div>
				</td>
				
			</tr>
			
		</table>
	</form>
  </div>
  <jsp:include page="/commons/bottom.html" flush="true"></jsp:include>
</div>

<script>
	
	new Validation(document.forms[0],{onSubmit:true,onFormValidate : function(result,form) {
		var finalResult = result;
		
		//在这里添加自定义验证
		
		return disableSubmit(finalResult,'submitButton');
	}});
</script>

</body>
</html>